var dataObj = []
var dataObjs = []

// 检索的首字母
var searchLetter = ["A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "W", "X",
	"Y", "Z"
]

//对数据信息进行分组
const dataList = (obj, objs) => {
	let tempArr = [];
	dataObj = obj
	dataObjs = objs

	searchLetter.map(initial => {
		tempArr.push({
			initial,
			dataInfo: dataObj.filter(item => item.initial == initial)
		});
	});
	// 输出数据结构：[ { dataInfo: [], initial: String }, { dataInfo: [], initial: String } ]
	return tempArr;
}

module.exports = {
	searchLetter,
	dataList,
	dataObjs
}
